import React, { Component } from 'react';
import {
  Text,
  View,
  StyleSheet,
  Dimensions,
} from 'react-native';
const ScreenWidth = Dimensions.get('window').width;

export class DashLine extends Component {


  constructor(props) {
    super(props);
    this.state = {

    }
  }

  render () {
    let { dashStyle } = this.props;

    let len = Math.ceil(ScreenWidth / 4);
    let arr = [];
    for (let i = 0; i < len; i++) {
      arr.push(i);
    }

    return (
      <View style={styles.dashLine}>
        {
          arr.map((item, index) => {
            return <Text style={[styles.dashItem, dashStyle]} key={'dash' + index}> </Text>
          })
        }
      </View>
    )

  }
}
const styles = StyleSheet.create({
  dashLine: {
    flexDirection: 'row',
  },
  dashItem: {
    height: 1,
    width: 2,
    marginRight: 2,
    flex: 1,
    backgroundColor: '#EFEFEF',
  }
})
